﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using ESOL.Common.Entity;
using ESOL.Business.Fa;

namespace ESOL.WinUI.Fa
{
    public partial class frmMaintainAssetMaintenanceHistory : BaseForm.frmBaseDialogyMaintainForm
    {
        #region Variable
        private string mAssetId;
        #endregion

        #region Construction
        public frmMaintainAssetMaintenanceHistory(FaAssetsEntity asset)
        {
            InitializeComponent();
            ThisActionType = Common.ActionType.View;
            mAssetId = asset.AssetId;
        }
        //public frmMaintainAssetMaintenanceHistory(string assetId)
        //{
        //    InitializeComponent();
        //    ThisActionType = Common.ActionType.View;
        //    mAssetId = assetId;
        //}
        #endregion

        #region Function
        private void BindDateGuid()
        {
            DataSet ds = FaManufacturerHistoryBs.GetByAsset(mAssetId);
            if (ds != null && ds.Tables.Count > 0)
            {
                gvMain.DataSource = ds.Tables[0];
            }
        }
        #endregion

        #region Events
        protected override void OnShown(EventArgs e)
        {
            BindDateGuid();
            base.OnShown(e);
        }
        #endregion


    }
}